package chainOfResponsibility;

public class ConcreteHandlerTwo extends Handler{
    @Override
    public void handleRequest(String request) {
        if (request.equals("two")) {
            System.out.println("solve two");
        } else {
            //判断空，保证客户端处进行设置
            if (getHandler() != null) {
                getHandler().handleRequest(request);
            } else {
                System.out.println("无人处理");
            }
        }
    }
}
